summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authort895 <clombardo169@gmail.com>2024-02-11 13:25:57 +0100
committert895 <clombardo169@gmail.com>2024-02-11 13:35:54 +0100
commitadebc96a9c449df092f6a3b8c09a169cf4b04ac4 (patch)
treea0301223c7cea69bdd1571461fb750f044c7803b
parentMerge pull request #12981 from lat9nq/tzdb-asan-custom (diff)
downloadyuzu-adebc96a9c449df092f6a3b8c09a169cf4b04ac4.tar
yuzu-adebc96a9c449df092f6a3b8c09a169cf4b04ac4.tar.gz
yuzu-adebc96a9c449df092f6a3b8c09a169cf4b04ac4.tar.bz2
yuzu-adebc96a9c449df092f6a3b8c09a169cf4b04ac4.tar.lz
yuzu-adebc96a9c449df092f6a3b8c09a169cf4b04ac4.tar.xz
yuzu-adebc96a9c449df092f6a3b8c09a169cf4b04ac4.tar.zst
yuzu-adebc96a9c449df092f6a3b8c09a169cf4b04ac4.zip
-rw-r--r--src/frontend_common/config.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/frontend_common/config.cpp b/src/frontend_common/config.cpp
index d34624d28..af6b10db6 100644
--- a/src/frontend_common/config.cpp
+++ b/src/frontend_common/config.cpp
@@ -867,15 +867,9 @@ void Config::Reload() {
}
void Config::ClearControlPlayerValues() const {
- // If key is an empty string, all keys in the current group() are removed.
+ // Removes the entire [Controls] section
const char* section = Settings::TranslateCategory(Settings::Category::Controls);
- CSimpleIniA::TNamesDepend keys;
- config->GetAllKeys(section, keys);
- for (const auto& key : keys) {
- if (std::string(config->GetValue(section, key.pItem)).empty()) {
- config->Delete(section, key.pItem);
- }
- }
+ config->Delete(section, nullptr, true);
}
const std::string& Config::GetConfigFilePath() const {